package sys.news.dao.impl;


import sys.news.dao.UserDao;
import sys.news.pojo.User;
import sys.news.util.DBUtil;

import java.util.List;

/**
 * @create 2021 -06 -01 11:17
 */
public class UserDaoImpl implements UserDao {
    /**
     * 
     * @param user
     * @return
     */
    @Override
    public int addUser(User user) {

        return 0;
    }

    /**
     * 删除用户
     * @param uid
     * @return
     */
    @Override
    public int delUser(int uid) {
        String sql = "DELETE FROM news_users WHERE uid = ?;";
        Object[] params = {uid};
        return DBUtil.update(sql,params);
    }

    /**
     *
     * @param user
     * @return
     */
    @Override
    public int updateUser(User user) {
        return 0;
    }

    /**
     *
     * @return
     */
    @Override
    public List<User> getAll() {
        return null;
    }
}
